package com.hsc.yalebao.otherlogin;

import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.BitmapFactory;
import android.graphics.BitmapFactory.Options;
import cn.sharesdk.framework.Platform;

public class Tool
{
  public static String actionToString(int paramInt)
  {
    switch (paramInt)
    {
    case 3:
    case 4:
    default:
      return "UNKNOWN";
    case 1:
      return "ACTION_AUTHORIZING";
    case 2:
      return "ACTION_GETTING_FRIEND_LIST";
    case 6:
      return "ACTION_FOLLOWING_USER";
    case 5:
      return "ACTION_SENDING_DIRECT_MESSAGE";
    case 7:
      return "ACTION_TIMELINE";
    case 8:
      return "ACTION_USER_INFOR";
    case 9:
    }
    return "ACTION_SHARE";
  }

  public static boolean canGetUserInfo(Platform paramPlatform)
  {
    if (paramPlatform == null);
    String str;
    do
    {
      return false;
      str = paramPlatform.getName();
    }
    while ((("Wechat".equals(str)) && (!paramPlatform.isClientValid())) || (("GooglePlus".equals(str)) && (!paramPlatform.isClientValid())) || ("WechatMoments".equals(str)) || ("WechatFavorite".equals(str)) || ("ShortMessage".equals(str)) || ("Email".equals(str)) || ("Pinterest".equals(str)) || ("Yixin".equals(str)) || ("YixinMoments".equals(str)) || ("Line".equals(str)) || ("Bluetooth".equals(str)) || ("WhatsApp".equals(str)) || ("Pocket".equals(str)) || ("BaiduTieba".equals(str)) || ("Laiwang".equals(str)) || ("LaiwangMoments".equals(str)) || ("Alipay".equals(str)));
    return true;
  }

  public static Bitmap compressImageFromFile(String paramString)
  {
    BitmapFactory.Options localOptions = new BitmapFactory.Options();
    localOptions.inJustDecodeBounds = true;
    BitmapFactory.decodeFile(paramString, localOptions);
    localOptions.inJustDecodeBounds = false;
    int i = localOptions.outWidth;
    int j = localOptions.outHeight;
    int k = 1;
    if ((i > j) && (i > 480.0F));
    for (k = (int)(localOptions.outWidth / 480.0F); ; k = (int)(localOptions.outHeight / 800.0F))
      do
      {
        if (k <= 0)
          k = 1;
        localOptions.inSampleSize = k;
        localOptions.inPreferredConfig = Bitmap.Config.ARGB_8888;
        localOptions.inPurgeable = true;
        localOptions.inInputShareable = true;
        return BitmapFactory.decodeFile(paramString, localOptions);
      }
      while ((i >= j) || (j <= 800.0F));
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.hsc.yalebao.otherlogin.Tool
 * JD-Core Version:    0.6.2
 */